import { userInfoResDTO } from "@/api/base/login";
import { RoleEnum } from "@/enums/roleEnum";

export const setUserInfo = (data: userInfoResDTO | null) => ({
	type: "set_user_info",
	payload: data
});

export const setAccessToken = (data: string | undefined) => ({
	type: "set_access_token",
	payload: data
});

export const setRefreshToken = (data: string | undefined) => ({
	type: "set_refresh_token",
	payload: data
});

export const setRoleList = (data: RoleEnum[]) => ({
	type: "set_role_list",
	payload: data
});

export const setSessionTimeout = (data: boolean) => ({
	type: "set_session_timeout",
	payload: data
});
